<template>
    <div class=box>
        <el-card style="max-width: 680px">
            <template #header>
                <div class="card-header">
                    <span>路况上报</span>
                </div>
            </template>
            <el-form :model="roadform" label-width="auto" style="max-width: 600px">
                <el-form-item label="事件类型">
                    <el-select v-model="roadform.kind" placeholder="请选择">
                        <el-option label="碰撞" value="碰撞" />
                        <el-option label="刮擦" value="刮擦" />
                        <el-option label="失火" value="失火" />
                        <el-option label="翻车" value="翻车" />
                        <el-option label="碾压" value="碾压" />
                        <el-option label="其他" value="其他" />
                    </el-select>
                </el-form-item>
                <el-form-item label="发生地点">
                    <el-input v-model="roadform.place" />
                </el-form-item>   
                <el-form-item label="驾驶人员">
                    <el-input v-model="roadform.name" />
                </el-form-item>  
                <el-form-item label="车牌信息">
                    <el-input v-model="roadform.carnumber" />
                </el-form-item>
              
                <el-form-item label="发生时间">
                    <el-col >
                        <el-date-picker v-model="roadform.date1" type="date" placeholder="Pick a date"
                            style="width: 100%" />
                    </el-col>
                </el-form-item>
                <el-form-item label="事件描述">
                    <el-input v-model="roadform.desc" type="textarea" />
                </el-form-item>
                <el-form-item class="btn">
                    <el-button type="primary" @click="onSubmit">提交</el-button>
                    <el-button>取消</el-button>
                </el-form-item>
            </el-form>
        </el-card>
    </div>
</template>

<script setup>
import { ref } from 'vue'
import { reactive } from 'vue'

const props = defineProps({
    roadShow:{
        type: Boolean,
    }
})
const {roadShow} = props
// do not use same name with ref
const roadform = reactive({
  name: '',
  region: '',
  date1: '',
  desc: '',
  place:'',
  car:''
})

const onSubmit = () => {
  console.log('submit!')
}
</script>

<style lang="scss" scoped>

</style>
